import request from '@/utils/request'

// 查询商品分类信息列表
export function listClassify(query) {
  return request({
    url: '/system/classify/list',
    method: 'get',
    params: query
  })
}

// 查询商品分类信息详细
export function getClassify(classifyId) {
  return request({
    url: '/system/classify/' + classifyId,
    method: 'get'
  })
}

// 新增商品分类信息
export function addClassify(data) {
  return request({
    url: '/system/classify',
    method: 'post',
    data: data
  })
}

// 修改商品分类信息
export function updateClassify(data) {
  return request({
    url: '/system/classify',
    method: 'put',
    data: data
  })
}

// 删除商品分类信息
export function delClassify(classifyId) {
  return request({
    url: '/system/classify/' + classifyId,
    method: 'delete'
  })
}

// 导出商品分类信息
export function exportClassify(query) {
  return request({
    url: '/system/classify/export',
    method: 'get',
    params: query
  })
}
//获取商品分类 可筛选
export function getGoodsClassify() {
  return request({
    url: '/system/classify/getGoodsClassify',
    method: 'get',
  })
}
//获取一级商品分类 可筛选
export function getGoodsClassifyListForOne() {
  return request({
    url: '/system/classify/getGoodsClassifyListForOne',
    method: 'get',
  })
}
//邏輯刪除 特殊商品圖片
export function delGoodsLowerClassify(id) {
  return request({
    url: '/system/classify/delGoodsLowerClassifyById',
    method: 'get',
    params: {"id":id}
  })
}

//修改特殊分类图片
export function uploadGoodsLowerClassifyById(data) {
  return request({
    url: '/system/lowerClassify',
    method: 'put',
    data: data
  })
}

//修改特殊分类图片
export function addGoodsLowerClassify(data) {
  return request({
    url: '/system/lowerClassify',
    method: 'post',
    data: data
  })
}
